Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change to flask sqlalchemy db session close #310

Merged
merged 2 commits into from
Aug 26, 2024
Merged

Change to flask sqlalchemy db session close #310

merged 2 commits into from
Aug 26, 2024

Conversation

bdc34
Copy link
Contributor

@bdc34 bdc34 commented Aug 26, 2024

master < dev of #309

bdc34 added 2 commits August 26, 2024 14:02
Removes unnecessary rollback on error. The existing call to Session.remove()
would already do this if there was an open transaction.

The Sqlalchemy docs say (sqlalchemy.scoping.scoped_session.close())

"This expunges all ORM objects associated with this
 :class:`_orm.Session`, ends any transaction in progress and
 :term:`releases` any :class:`_engine.Connection` objects which this
 :class:`_orm.Session` itself has checked out from associated
 :class:`_engine.Engine` objects. The operation then leaves the
 :class:`_orm.Session` in a state which it may be used again."
…b-rollback

Change to flask sqlalchemy db session close
@bdc34 bdc34 requested a review from a team August 26, 2024 18:33
@bdc34 bdc34 merged commit bbfaf92 into master Aug 26, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants